<template>
    <div class="platform-content">
        <h4 class="platform-content-title">
            <span>应急信息数据表</span>
            <div class="platform-list-op">
                <el-button
                        v-permission="'fetchdata.excelemergencyshelter.create'"
                        size="small"
                        type="primary"
                        @click="openCreate"
                >
                    新建
                </el-button>
                <el-button
                        size="mini"
                        type="success"
                        @click="changeSearch"
                >
                    收起/展开
                </el-button>
            </div>
        </h4>
        <div class="platform-content-info">
            <el-row>
                <el-form
                        ref="searchForm"
                        :inline="true"
                        :model="pageData"
                        class="platform-content-search-form-more"
                >
                    <el-row v-if="showSearch">
                                                <el-col :span="6">
                            <el-form-item label="行政区域">
                                <el-input
                                        v-model="pageData.xzqy"
                                        placeholder="行政区域"
                                        maxlength="255"
                                        auto-complete="off"
                                        type="text"
                                />
                            </el-form-item>
                        </el-col>
                                                <el-col :span="6">
                            <el-form-item label="应急避难场所全称">
                                <el-input
                                        v-model="pageData.yjbncsqc"
                                        placeholder="应急避难场所全称"
                                        maxlength="255"
                                        auto-complete="off"
                                        type="text"
                                />
                            </el-form-item>
                        </el-col>
                                                <el-col :span="6">
                            <el-form-item label="应急避难场所地址">
                                <el-input
                                        v-model="pageData.yjbncsdz"
                                        placeholder="应急避难场所地址"
                                        maxlength="255"
                                        auto-complete="off"
                                        type="text"
                                />
                            </el-form-item>
                        </el-col>
                                                <el-col :span="6">
                            <el-form-item label="按突发事件类型分类">
                                <el-input
                                        v-model="pageData.atfsjlxfl"
                                        placeholder="按突发事件类型分类"
                                        maxlength="255"
                                        auto-complete="off"
                                        type="text"
                                />
                            </el-form-item>
                        </el-col>
                                                <el-col :span="6">
                            <el-form-item label="避难种类">
                                <el-input
                                        v-model="pageData.bnzl"
                                        placeholder="避难种类"
                                        maxlength="255"
                                        auto-complete="off"
                                        type="text"
                                />
                            </el-form-item>
                        </el-col>
                                                <el-col :span="6">
                            <el-form-item label="按避难时长设计分类">
                                <el-input
                                        v-model="pageData.abnscsjfl"
                                        placeholder="按避难时长设计分类"
                                        maxlength="255"
                                        auto-complete="off"
                                        type="text"
                                />
                            </el-form-item>
                        </el-col>
                                                <el-col :span="6">
                            <el-form-item label="按空间类型分类">
                                <el-input
                                        v-model="pageData.akjlxfl"
                                        placeholder="按空间类型分类"
                                        maxlength="255"
                                        auto-complete="off"
                                        type="text"
                                />
                            </el-form-item>
                        </el-col>
                                                <el-col :span="6">
                            <el-form-item label="按总体功能定位分类">
                                <el-input
                                        v-model="pageData.aztgndwfl"
                                        placeholder="按总体功能定位分类"
                                        maxlength="255"
                                        auto-complete="off"
                                        type="text"
                                />
                            </el-form-item>
                        </el-col>
                                                <el-col :span="6">
                            <el-form-item label="应急避难场所建设类型">
                                <el-input
                                        v-model="pageData.yjbncsjslx"
                                        placeholder="应急避难场所建设类型"
                                        maxlength="255"
                                        auto-complete="off"
                                        type="text"
                                />
                            </el-form-item>
                        </el-col>
                                                <el-col :span="6">
                            <el-form-item label="应急避难场所占地总面积（平方米）">
                                <el-input
                                        v-model="pageData.yjbncszdzmj"
                                        placeholder="应急避难场所占地总面积（平方米）"
                                        maxlength="255"
                                        auto-complete="off"
                                        type="text"
                                />
                            </el-form-item>
                        </el-col>
                                                <el-col :span="6">
                            <el-form-item label="应急避难场所室内面积（平方米）">
                                <el-input
                                        v-model="pageData.yjbncssnmj"
                                        placeholder="应急避难场所室内面积（平方米）"
                                        maxlength="255"
                                        auto-complete="off"
                                        type="text"
                                />
                            </el-form-item>
                        </el-col>
                                                <el-col :span="6">
                            <el-form-item label="避难场所容纳">
                                <el-input
                                        v-model="pageData.bncsrlrs"
                                        placeholder="避难场所容纳"
                                        maxlength="255"
                                        auto-complete="off"
                                        type="text"
                                />
                            </el-form-item>
                        </el-col>
                                                <el-col :span="6">
                            <el-form-item label="物资储备">
                                <el-input
                                        v-model="pageData.wzcb"
                                        placeholder="物资储备"
                                        maxlength="255"
                                        auto-complete="off"
                                        type="text"
                                />
                            </el-form-item>
                        </el-col>
                                                <el-col :span="6">
                            <el-form-item label="应急设施">
                                <el-input
                                        v-model="pageData.yjss"
                                        placeholder="应急设施"
                                        maxlength="255"
                                        auto-complete="off"
                                        type="text"
                                />
                            </el-form-item>
                        </el-col>
                                                <el-col :span="6">
                            <el-form-item label="认定部门">
                                <el-input
                                        v-model="pageData.rdbm"
                                        placeholder="认定部门"
                                        maxlength="255"
                                        auto-complete="off"
                                        type="text"
                                />
                            </el-form-item>
                        </el-col>
                                                <el-col :span="6">
                            <el-form-item label="主管单位">
                                <el-input
                                        v-model="pageData.zgdw"
                                        placeholder="主管单位"
                                        maxlength="255"
                                        auto-complete="off"
                                        type="text"
                                />
                            </el-form-item>
                        </el-col>
                                                <el-col :span="6">
                            <el-form-item label="建设单位">
                                <el-input
                                        v-model="pageData.jsdw"
                                        placeholder="建设单位"
                                        maxlength="255"
                                        auto-complete="off"
                                        type="text"
                                />
                            </el-form-item>
                        </el-col>
                                                <el-col :span="6">
                            <el-form-item label="建成（或挂牌）时间">
                                <el-input
                                        v-model="pageData.jcsj"
                                        placeholder="建成（或挂牌）时间"
                                        maxlength="255"
                                        auto-complete="off"
                                        type="text"
                                />
                            </el-form-item>
                        </el-col>
                                                <el-col :span="6">
                            <el-form-item label="规划情况">
                                <el-input
                                        v-model="pageData.ghqk"
                                        placeholder="规划情况"
                                        maxlength="255"
                                        auto-complete="off"
                                        type="text"
                                />
                            </el-form-item>
                        </el-col>
                                                <el-col :span="6">
                            <el-form-item label="按空间类型分类">
                                <el-input
                                        v-model="pageData.jsztz"
                                        placeholder="按空间类型分类"
                                        maxlength="255"
                                        auto-complete="off"
                                        type="text"
                                />
                            </el-form-item>
                        </el-col>
                                                <el-col :span="6">
                            <el-form-item label="建设标准名称">
                                <el-input
                                        v-model="pageData.jsbzmc"
                                        placeholder="建设标准名称"
                                        maxlength="255"
                                        auto-complete="off"
                                        type="text"
                                />
                            </el-form-item>
                        </el-col>
                                                <el-col :span="6">
                            <el-form-item label="日常维护或管理人员数量">
                                <el-input
                                        v-model="pageData.rcwhhglrysl"
                                        placeholder="日常维护或管理人员数量"
                                        maxlength="255"
                                        auto-complete="off"
                                        type="text"
                                />
                            </el-form-item>
                        </el-col>
                                                <el-col :span="6">
                            <el-form-item label="专职维护或管理人员数量">
                                <el-input
                                        v-model="pageData.zzwhhglrysl"
                                        placeholder="专职维护或管理人员数量"
                                        maxlength="255"
                                        auto-complete="off"
                                        type="text"
                                />
                            </el-form-item>
                        </el-col>
                                                <el-col :span="6">
                            <el-form-item label="产权/运维单位">
                                <el-input
                                        v-model="pageData.cqyydw"
                                        placeholder="产权/运维单位"
                                        maxlength="255"
                                        auto-complete="off"
                                        type="text"
                                />
                            </el-form-item>
                        </el-col>
                                                <el-col :span="6">
                            <el-form-item label="运维投入">
                                <el-input
                                        v-model="pageData.ywtr"
                                        placeholder="运维投入"
                                        maxlength="255"
                                        auto-complete="off"
                                        type="text"
                                />
                            </el-form-item>
                        </el-col>
                                                <el-col :span="6">
                            <el-form-item label="运维投入渠道">
                                <el-input
                                        v-model="pageData.ywtrqd"
                                        placeholder="运维投入渠道"
                                        maxlength="255"
                                        auto-complete="off"
                                        type="text"
                                />
                            </el-form-item>
                        </el-col>
                                                <el-col :span="6" style="float:right;">
                            <div class="platform-content-search-op-more">
                                <el-button
                                        size="small"
                                        @click="doReSearch"
                                >
                                    重 置
                                </el-button>
                                <el-button
                                        size="small"
                                        type="primary"
                                        @click="doSearch"
                                >
                                    查 询
                                </el-button>
                            </div>
                        </el-col>
                    </el-row>
                </el-form>
            </el-row>
            <div class="platform-content-list">
                <div class="platform-content-list-table">
                    <el-table
                            v-loading="listLoading"
                            :data="listData"
                            stripe
                            @sort-change="doPageSort"
                    >
                                                    <el-table-column
                                    prop="xzqy"
                                    label="行政区域"
                                    sortable
                            />
                                                    <el-table-column
                                    prop="yjbncsqc"
                                    label="应急避难场所全称"
                                    sortable
                            />
                                                    <el-table-column
                                    prop="yjbncsdz"
                                    label="应急避难场所地址"
                                    sortable
                            />
                                                    <el-table-column
                                    prop="atfsjlxfl"
                                    label="按突发事件类型分类"
                                    sortable
                            />
                                                    <el-table-column
                                    prop="bnzl"
                                    label="避难种类"
                                    sortable
                            />
                                                    <el-table-column
                                    prop="abnscsjfl"
                                    label="按避难时长设计分类"
                                    sortable
                            />
                                                    <el-table-column
                                    prop="akjlxfl"
                                    label="按空间类型分类"
                                    sortable
                            />
                                                    <el-table-column
                                    prop="aztgndwfl"
                                    label="按总体功能定位分类"
                                    sortable
                            />
                                                    <el-table-column
                                    prop="yjbncsjslx"
                                    label="应急避难场所建设类型"
                                    sortable
                            />
                                                    <el-table-column
                                    prop="yjbncszdzmj"
                                    label="应急避难场所占地总面积（平方米）"
                                    sortable
                            />
                                                    <el-table-column
                                    prop="yjbncssnmj"
                                    label="应急避难场所室内面积（平方米）"
                                    sortable
                            />
                                                    <el-table-column
                                    prop="bncsrlrs"
                                    label="避难场所容纳"
                                    sortable
                            />
                                                    <el-table-column
                                    prop="wzcb"
                                    label="物资储备"
                                    sortable
                            />
                                                    <el-table-column
                                    prop="yjss"
                                    label="应急设施"
                                    sortable
                            />
                                                    <el-table-column
                                    prop="rdbm"
                                    label="认定部门"
                                    sortable
                            />
                                                    <el-table-column
                                    prop="zgdw"
                                    label="主管单位"
                                    sortable
                            />
                                                    <el-table-column
                                    prop="jsdw"
                                    label="建设单位"
                                    sortable
                            />
                                                    <el-table-column
                                    prop="jcsj"
                                    label="建成（或挂牌）时间"
                                    sortable
                            />
                                                    <el-table-column
                                    prop="ghqk"
                                    label="规划情况"
                                    sortable
                            />
                                                    <el-table-column
                                    prop="jsztz"
                                    label="按空间类型分类"
                                    sortable
                            />
                                                    <el-table-column
                                    prop="jsbzmc"
                                    label="建设标准名称"
                                    sortable
                            />
                                                    <el-table-column
                                    prop="rcwhhglrysl"
                                    label="日常维护或管理人员数量"
                                    sortable
                            />
                                                    <el-table-column
                                    prop="zzwhhglrysl"
                                    label="专职维护或管理人员数量"
                                    sortable
                            />
                                                    <el-table-column
                                    prop="cqyydw"
                                    label="产权/运维单位"
                                    sortable
                            />
                                                    <el-table-column
                                    prop="ywtr"
                                    label="运维投入"
                                    sortable
                            />
                                                    <el-table-column
                                    prop="ywtrqd"
                                    label="运维投入渠道"
                                    sortable
                            />
                                                <el-table-column
                                fixed="right"
                                header-align="center"
                                align="center"
                                label="操作"
                                width="180"
                        >
                            <template slot-scope="scope">
                                <el-button
                                        v-permission="'fetchdata.excelemergencyshelter'"
                                        type="text"
                                        size="small"
                                        @click.native.prevent="openShow(scope.row)"
                                >
                                    详情
                                </el-button>
                                <el-button
                                        v-permission="'fetchdata.excelemergencyshelter.update'"
                                        type="text"
                                        size="small"
                                        @click.native.prevent="openUpdate(scope.row)"
                                >
                                    修改
                                </el-button>
                                <el-button
                                        v-permission="'fetchdata.excelemergencyshelter.delete'"
                                        type="text"
                                        size="small"
                                        class="button-delete-color"
                                        @click.native.prevent="openDelete(scope.row)"
                                >
                                    删除
                                </el-button>
                            </template>
                        </el-table-column>
                    </el-table>
                </div>
                <div class="platform-content-list-pagination">
                    <el-pagination
                            :current-page="pageData.pageNo"
                            :page-size="pageData.pageSize"
                            :total="pageData.totalCount"
                            class="platform-pagenation"
                            background
                            :page-sizes="[10, 20, 30, 50]"
                            layout="sizes, prev, pager, next"
                            @current-change="doChangePage"
                            @size-change="doSizeChange"
                    />
                </div>
            </div>
        </div>

        <el-dialog
                title="新建"
                :visible.sync="createDialogVisible"
                :close-on-click-modal="false"
                width="50%"
        >
            <el-form
                    ref="createForm"
                    :model="formData"
                    :rules="formRules"
                    size="small"
                    label-width="120px"
            >
                                    <el-form-item
                            prop="xzqy"
                            label="行政区域"
                    >
                        <el-input
                                v-model="formData.xzqy"
                                maxlength="100"
                                placeholder="行政区域"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="yjbncsqc"
                            label="应急避难场所全称"
                    >
                        <el-input
                                v-model="formData.yjbncsqc"
                                maxlength="100"
                                placeholder="应急避难场所全称"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="yjbncsdz"
                            label="应急避难场所地址"
                    >
                        <el-input
                                v-model="formData.yjbncsdz"
                                maxlength="100"
                                placeholder="应急避难场所地址"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="atfsjlxfl"
                            label="按突发事件类型分类"
                    >
                        <el-input
                                v-model="formData.atfsjlxfl"
                                maxlength="100"
                                placeholder="按突发事件类型分类"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="bnzl"
                            label="避难种类"
                    >
                        <el-input
                                v-model="formData.bnzl"
                                maxlength="100"
                                placeholder="避难种类"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="abnscsjfl"
                            label="按避难时长设计分类"
                    >
                        <el-input
                                v-model="formData.abnscsjfl"
                                maxlength="100"
                                placeholder="按避难时长设计分类"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="akjlxfl"
                            label="按空间类型分类"
                    >
                        <el-input
                                v-model="formData.akjlxfl"
                                maxlength="100"
                                placeholder="按空间类型分类"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="aztgndwfl"
                            label="按总体功能定位分类"
                    >
                        <el-input
                                v-model="formData.aztgndwfl"
                                maxlength="100"
                                placeholder="按总体功能定位分类"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="yjbncsjslx"
                            label="应急避难场所建设类型"
                    >
                        <el-input
                                v-model="formData.yjbncsjslx"
                                maxlength="100"
                                placeholder="应急避难场所建设类型"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="yjbncszdzmj"
                            label="应急避难场所占地总面积（平方米）"
                    >
                        <el-input
                                v-model="formData.yjbncszdzmj"
                                maxlength="100"
                                placeholder="应急避难场所占地总面积（平方米）"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="yjbncssnmj"
                            label="应急避难场所室内面积（平方米）"
                    >
                        <el-input
                                v-model="formData.yjbncssnmj"
                                maxlength="100"
                                placeholder="应急避难场所室内面积（平方米）"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="bncsrlrs"
                            label="避难场所容纳"
                    >
                        <el-input
                                v-model="formData.bncsrlrs"
                                maxlength="100"
                                placeholder="避难场所容纳"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="wzcb"
                            label="物资储备"
                    >
                        <el-input
                                v-model="formData.wzcb"
                                maxlength="100"
                                placeholder="物资储备"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="yjss"
                            label="应急设施"
                    >
                        <el-input
                                v-model="formData.yjss"
                                maxlength="100"
                                placeholder="应急设施"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="rdbm"
                            label="认定部门"
                    >
                        <el-input
                                v-model="formData.rdbm"
                                maxlength="100"
                                placeholder="认定部门"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="zgdw"
                            label="主管单位"
                    >
                        <el-input
                                v-model="formData.zgdw"
                                maxlength="100"
                                placeholder="主管单位"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="jsdw"
                            label="建设单位"
                    >
                        <el-input
                                v-model="formData.jsdw"
                                maxlength="100"
                                placeholder="建设单位"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="jcsj"
                            label="建成（或挂牌）时间"
                    >
                        <el-input
                                v-model="formData.jcsj"
                                maxlength="100"
                                placeholder="建成（或挂牌）时间"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="ghqk"
                            label="规划情况"
                    >
                        <el-input
                                v-model="formData.ghqk"
                                maxlength="100"
                                placeholder="规划情况"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="jsztz"
                            label="按空间类型分类"
                    >
                        <el-input
                                v-model="formData.jsztz"
                                maxlength="100"
                                placeholder="按空间类型分类"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="jsbzmc"
                            label="建设标准名称"
                    >
                        <el-input
                                v-model="formData.jsbzmc"
                                maxlength="100"
                                placeholder="建设标准名称"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="rcwhhglrysl"
                            label="日常维护或管理人员数量"
                    >
                        <el-input
                                v-model="formData.rcwhhglrysl"
                                maxlength="100"
                                placeholder="日常维护或管理人员数量"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="zzwhhglrysl"
                            label="专职维护或管理人员数量"
                    >
                        <el-input
                                v-model="formData.zzwhhglrysl"
                                maxlength="100"
                                placeholder="专职维护或管理人员数量"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="cqyydw"
                            label="产权/运维单位"
                    >
                        <el-input
                                v-model="formData.cqyydw"
                                maxlength="100"
                                placeholder="产权/运维单位"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="ywtr"
                            label="运维投入"
                    >
                        <el-input
                                v-model="formData.ywtr"
                                maxlength="100"
                                placeholder="运维投入"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="ywtrqd"
                            label="运维投入渠道"
                    >
                        <el-input
                                v-model="formData.ywtrqd"
                                maxlength="100"
                                placeholder="运维投入渠道"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                            </el-form>
            <span slot="footer" class="dialog-footer">
        <el-button size="small" @click="createDialogVisible = false">取 消</el-button>
        <el-button
                size="small"
                type="primary"
                :loading="btnLoading"
                @click="doCreate"
        >确 定</el-button>
      </span>
        </el-dialog>
        <el-dialog
                title="查看详情"
                :visible.sync="showDialogVisible"
                :close-on-click-modal="false"
                width="50%"
        >
            <el-descriptions class="margin-top" colon="false" direction="horizontal" :column="1" :size="size" border="false">
                                    <el-descriptions-item>
                        <template slot="label">
                            行政区域
                        </template>
                        {{formData.xzqy}}
                    </el-descriptions-item>
                                    <el-descriptions-item>
                        <template slot="label">
                            应急避难场所全称
                        </template>
                        {{formData.yjbncsqc}}
                    </el-descriptions-item>
                                    <el-descriptions-item>
                        <template slot="label">
                            应急避难场所地址
                        </template>
                        {{formData.yjbncsdz}}
                    </el-descriptions-item>
                                    <el-descriptions-item>
                        <template slot="label">
                            按突发事件类型分类
                        </template>
                        {{formData.atfsjlxfl}}
                    </el-descriptions-item>
                                    <el-descriptions-item>
                        <template slot="label">
                            避难种类
                        </template>
                        {{formData.bnzl}}
                    </el-descriptions-item>
                                    <el-descriptions-item>
                        <template slot="label">
                            按避难时长设计分类
                        </template>
                        {{formData.abnscsjfl}}
                    </el-descriptions-item>
                                    <el-descriptions-item>
                        <template slot="label">
                            按空间类型分类
                        </template>
                        {{formData.akjlxfl}}
                    </el-descriptions-item>
                                    <el-descriptions-item>
                        <template slot="label">
                            按总体功能定位分类
                        </template>
                        {{formData.aztgndwfl}}
                    </el-descriptions-item>
                                    <el-descriptions-item>
                        <template slot="label">
                            应急避难场所建设类型
                        </template>
                        {{formData.yjbncsjslx}}
                    </el-descriptions-item>
                                    <el-descriptions-item>
                        <template slot="label">
                            应急避难场所占地总面积（平方米）
                        </template>
                        {{formData.yjbncszdzmj}}
                    </el-descriptions-item>
                                    <el-descriptions-item>
                        <template slot="label">
                            应急避难场所室内面积（平方米）
                        </template>
                        {{formData.yjbncssnmj}}
                    </el-descriptions-item>
                                    <el-descriptions-item>
                        <template slot="label">
                            避难场所容纳
                        </template>
                        {{formData.bncsrlrs}}
                    </el-descriptions-item>
                                    <el-descriptions-item>
                        <template slot="label">
                            物资储备
                        </template>
                        {{formData.wzcb}}
                    </el-descriptions-item>
                                    <el-descriptions-item>
                        <template slot="label">
                            应急设施
                        </template>
                        {{formData.yjss}}
                    </el-descriptions-item>
                                    <el-descriptions-item>
                        <template slot="label">
                            认定部门
                        </template>
                        {{formData.rdbm}}
                    </el-descriptions-item>
                                    <el-descriptions-item>
                        <template slot="label">
                            主管单位
                        </template>
                        {{formData.zgdw}}
                    </el-descriptions-item>
                                    <el-descriptions-item>
                        <template slot="label">
                            建设单位
                        </template>
                        {{formData.jsdw}}
                    </el-descriptions-item>
                                    <el-descriptions-item>
                        <template slot="label">
                            建成（或挂牌）时间
                        </template>
                        {{formData.jcsj}}
                    </el-descriptions-item>
                                    <el-descriptions-item>
                        <template slot="label">
                            规划情况
                        </template>
                        {{formData.ghqk}}
                    </el-descriptions-item>
                                    <el-descriptions-item>
                        <template slot="label">
                            按空间类型分类
                        </template>
                        {{formData.jsztz}}
                    </el-descriptions-item>
                                    <el-descriptions-item>
                        <template slot="label">
                            建设标准名称
                        </template>
                        {{formData.jsbzmc}}
                    </el-descriptions-item>
                                    <el-descriptions-item>
                        <template slot="label">
                            日常维护或管理人员数量
                        </template>
                        {{formData.rcwhhglrysl}}
                    </el-descriptions-item>
                                    <el-descriptions-item>
                        <template slot="label">
                            专职维护或管理人员数量
                        </template>
                        {{formData.zzwhhglrysl}}
                    </el-descriptions-item>
                                    <el-descriptions-item>
                        <template slot="label">
                            产权/运维单位
                        </template>
                        {{formData.cqyydw}}
                    </el-descriptions-item>
                                    <el-descriptions-item>
                        <template slot="label">
                            运维投入
                        </template>
                        {{formData.ywtr}}
                    </el-descriptions-item>
                                    <el-descriptions-item>
                        <template slot="label">
                            运维投入渠道
                        </template>
                        {{formData.ywtrqd}}
                    </el-descriptions-item>
                            </el-descriptions>
            <span slot="footer" class="dialog-footer">
        <el-button size="small" type="primary" @click="showDialogVisible = false">关 闭</el-button>
      </span>
        </el-dialog>
        <el-dialog
                title="修改分类"
                :visible.sync="updateDialogVisible"
                :close-on-click-modal="false"
                width="50%"
        >
            <el-form
                    ref="updateForm"
                    :model="formData"
                    :rules="formRules"
                    size="small"
                    label-width="120px"
            >
                                    <el-form-item
                            prop="xzqy"
                            label="行政区域"
                    >
                        <el-input
                                v-model="formData.xzqy"
                                maxlength="100"
                                placeholder="行政区域"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="yjbncsqc"
                            label="应急避难场所全称"
                    >
                        <el-input
                                v-model="formData.yjbncsqc"
                                maxlength="100"
                                placeholder="应急避难场所全称"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="yjbncsdz"
                            label="应急避难场所地址"
                    >
                        <el-input
                                v-model="formData.yjbncsdz"
                                maxlength="100"
                                placeholder="应急避难场所地址"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="atfsjlxfl"
                            label="按突发事件类型分类"
                    >
                        <el-input
                                v-model="formData.atfsjlxfl"
                                maxlength="100"
                                placeholder="按突发事件类型分类"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="bnzl"
                            label="避难种类"
                    >
                        <el-input
                                v-model="formData.bnzl"
                                maxlength="100"
                                placeholder="避难种类"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="abnscsjfl"
                            label="按避难时长设计分类"
                    >
                        <el-input
                                v-model="formData.abnscsjfl"
                                maxlength="100"
                                placeholder="按避难时长设计分类"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="akjlxfl"
                            label="按空间类型分类"
                    >
                        <el-input
                                v-model="formData.akjlxfl"
                                maxlength="100"
                                placeholder="按空间类型分类"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="aztgndwfl"
                            label="按总体功能定位分类"
                    >
                        <el-input
                                v-model="formData.aztgndwfl"
                                maxlength="100"
                                placeholder="按总体功能定位分类"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="yjbncsjslx"
                            label="应急避难场所建设类型"
                    >
                        <el-input
                                v-model="formData.yjbncsjslx"
                                maxlength="100"
                                placeholder="应急避难场所建设类型"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="yjbncszdzmj"
                            label="应急避难场所占地总面积（平方米）"
                    >
                        <el-input
                                v-model="formData.yjbncszdzmj"
                                maxlength="100"
                                placeholder="应急避难场所占地总面积（平方米）"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="yjbncssnmj"
                            label="应急避难场所室内面积（平方米）"
                    >
                        <el-input
                                v-model="formData.yjbncssnmj"
                                maxlength="100"
                                placeholder="应急避难场所室内面积（平方米）"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="bncsrlrs"
                            label="避难场所容纳"
                    >
                        <el-input
                                v-model="formData.bncsrlrs"
                                maxlength="100"
                                placeholder="避难场所容纳"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="wzcb"
                            label="物资储备"
                    >
                        <el-input
                                v-model="formData.wzcb"
                                maxlength="100"
                                placeholder="物资储备"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="yjss"
                            label="应急设施"
                    >
                        <el-input
                                v-model="formData.yjss"
                                maxlength="100"
                                placeholder="应急设施"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="rdbm"
                            label="认定部门"
                    >
                        <el-input
                                v-model="formData.rdbm"
                                maxlength="100"
                                placeholder="认定部门"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="zgdw"
                            label="主管单位"
                    >
                        <el-input
                                v-model="formData.zgdw"
                                maxlength="100"
                                placeholder="主管单位"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="jsdw"
                            label="建设单位"
                    >
                        <el-input
                                v-model="formData.jsdw"
                                maxlength="100"
                                placeholder="建设单位"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="jcsj"
                            label="建成（或挂牌）时间"
                    >
                        <el-input
                                v-model="formData.jcsj"
                                maxlength="100"
                                placeholder="建成（或挂牌）时间"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="ghqk"
                            label="规划情况"
                    >
                        <el-input
                                v-model="formData.ghqk"
                                maxlength="100"
                                placeholder="规划情况"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="jsztz"
                            label="按空间类型分类"
                    >
                        <el-input
                                v-model="formData.jsztz"
                                maxlength="100"
                                placeholder="按空间类型分类"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="jsbzmc"
                            label="建设标准名称"
                    >
                        <el-input
                                v-model="formData.jsbzmc"
                                maxlength="100"
                                placeholder="建设标准名称"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="rcwhhglrysl"
                            label="日常维护或管理人员数量"
                    >
                        <el-input
                                v-model="formData.rcwhhglrysl"
                                maxlength="100"
                                placeholder="日常维护或管理人员数量"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="zzwhhglrysl"
                            label="专职维护或管理人员数量"
                    >
                        <el-input
                                v-model="formData.zzwhhglrysl"
                                maxlength="100"
                                placeholder="专职维护或管理人员数量"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="cqyydw"
                            label="产权/运维单位"
                    >
                        <el-input
                                v-model="formData.cqyydw"
                                maxlength="100"
                                placeholder="产权/运维单位"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="ywtr"
                            label="运维投入"
                    >
                        <el-input
                                v-model="formData.ywtr"
                                maxlength="100"
                                placeholder="运维投入"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="ywtrqd"
                            label="运维投入渠道"
                    >
                        <el-input
                                v-model="formData.ywtrqd"
                                maxlength="100"
                                placeholder="运维投入渠道"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                            </el-form>
            <span slot="footer" class="dialog-footer">
        <el-button size="small" @click="updateDialogVisible = false">取 消</el-button>
        <el-button
                size="small"
                type="primary"
                :loading="btnLoading"
                @click="doUpdate"
        >确 定</el-button>
      </span>
        </el-dialog>
    </div>
</template>

<script>
    import {
        API_FETCHDATA_EXCELEMERGENCYSHELTER_LIST,
        API_FETCHDATA_EXCELEMERGENCYSHELTER_CREATE,
        API_FETCHDATA_EXCELEMERGENCYSHELTER_DELETE,
        API_FETCHDATA_EXCELEMERGENCYSHELTER_UPDATE,
        API_FETCHDATA_EXCELEMERGENCYSHELTER_GET
    } from '@/constant/api/fetchdata/excelemergencyshelter'
    export default {
        middleware: ['authenticated', 'check_permissions'],
        data() {
            return {
                loading: true,
                btnLoading: false,
                listLoading: false,
                createDialogVisible: false,
                updateDialogVisible: false,
                showDialogVisible: false,
                showSearch: false,
                listData: [],
                pageData: {
                    pageNo: 1,
                    pageSize: 10,
                    totalCount: 0,
                    pageOrderName: 'createdAt',
                    pageOrderBy: 'descending'
                },
                formData: {
                },
                editData: {
                }
            }
        },
        computed: {
            // 表单验证,写在computed里切换多语言才会更新
            formRules() {
                const formRules = {
                                                xzqy: [
                            {
                                required: false,
                                message: '行政区域',
                                trigger: 'blur'
                            }
                        ],
                                                yjbncsqc: [
                            {
                                required: false,
                                message: '应急避难场所全称',
                                trigger: 'blur'
                            }
                        ],
                                                yjbncsdz: [
                            {
                                required: false,
                                message: '应急避难场所地址',
                                trigger: 'blur'
                            }
                        ],
                                                atfsjlxfl: [
                            {
                                required: false,
                                message: '按突发事件类型分类',
                                trigger: 'blur'
                            }
                        ],
                                                bnzl: [
                            {
                                required: false,
                                message: '避难种类',
                                trigger: 'blur'
                            }
                        ],
                                                abnscsjfl: [
                            {
                                required: false,
                                message: '按避难时长设计分类',
                                trigger: 'blur'
                            }
                        ],
                                                akjlxfl: [
                            {
                                required: false,
                                message: '按空间类型分类',
                                trigger: 'blur'
                            }
                        ],
                                                aztgndwfl: [
                            {
                                required: false,
                                message: '按总体功能定位分类',
                                trigger: 'blur'
                            }
                        ],
                                                yjbncsjslx: [
                            {
                                required: false,
                                message: '应急避难场所建设类型',
                                trigger: 'blur'
                            }
                        ],
                                                yjbncszdzmj: [
                            {
                                required: false,
                                message: '应急避难场所占地总面积（平方米）',
                                trigger: 'blur'
                            }
                        ],
                                                yjbncssnmj: [
                            {
                                required: false,
                                message: '应急避难场所室内面积（平方米）',
                                trigger: 'blur'
                            }
                        ],
                                                bncsrlrs: [
                            {
                                required: false,
                                message: '避难场所容纳',
                                trigger: 'blur'
                            }
                        ],
                                                wzcb: [
                            {
                                required: false,
                                message: '物资储备',
                                trigger: 'blur'
                            }
                        ],
                                                yjss: [
                            {
                                required: false,
                                message: '应急设施',
                                trigger: 'blur'
                            }
                        ],
                                                rdbm: [
                            {
                                required: false,
                                message: '认定部门',
                                trigger: 'blur'
                            }
                        ],
                                                zgdw: [
                            {
                                required: false,
                                message: '主管单位',
                                trigger: 'blur'
                            }
                        ],
                                                jsdw: [
                            {
                                required: false,
                                message: '建设单位',
                                trigger: 'blur'
                            }
                        ],
                                                jcsj: [
                            {
                                required: false,
                                message: '建成（或挂牌）时间',
                                trigger: 'blur'
                            }
                        ],
                                                ghqk: [
                            {
                                required: false,
                                message: '规划情况',
                                trigger: 'blur'
                            }
                        ],
                                                jsztz: [
                            {
                                required: false,
                                message: '按空间类型分类',
                                trigger: 'blur'
                            }
                        ],
                                                jsbzmc: [
                            {
                                required: false,
                                message: '建设标准名称',
                                trigger: 'blur'
                            }
                        ],
                                                rcwhhglrysl: [
                            {
                                required: false,
                                message: '日常维护或管理人员数量',
                                trigger: 'blur'
                            }
                        ],
                                                zzwhhglrysl: [
                            {
                                required: false,
                                message: '专职维护或管理人员数量',
                                trigger: 'blur'
                            }
                        ],
                                                cqyydw: [
                            {
                                required: false,
                                message: '产权/运维单位',
                                trigger: 'blur'
                            }
                        ],
                                                ywtr: [
                            {
                                required: false,
                                message: '运维投入',
                                trigger: 'blur'
                            }
                        ],
                                                ywtrqd: [
                            {
                                required: false,
                                message: '运维投入渠道',
                                trigger: 'blur'
                            }
                        ],
                                    }
                return formRules
            }
        },


        created() {
            if (process.browser) {
                this.listPage()
            }
        },
        methods: {
            // 打开字新增窗口
            openCreate() {
                this.formData = {}
                this.createDialogVisible = true
            },
            // 提交表单
            doCreate() {
                this.$refs['createForm']
                        .validate( (valid) => {
                if (valid) {
                this.btnLoading = true
                this.$axios
                .$post(API_FETCHDATA_EXCELEMERGENCYSHELTER_CREATE, this.formData)
                .then((d) => {
                this.btnLoading = false
                if (d.code === 0) {
                this.$message({
                message: d.msg,
                type: 'success'
                })
                this.createDialogVisible = false
                this.listPage()
                }
                })
                }
                })
            },
            // 打开修改窗口
            openUpdate(row) {
                this.editData.id = row.id
                this.$axios.$post(API_FETCHDATA_EXCELEMERGENCYSHELTER_GET, this.editData).then((d) => {
                    if (d.code === 0) {
                        this.formData = d.data
                        this.updateDialogVisible = true
                    }
                })
            },
            // 打开详情窗口
            openShow(row) {
                this.editData.id = row.id
                this.$axios.$post(API_FETCHDATA_EXCELEMERGENCYSHELTER_GET, this.editData).then((d) => {
                    if (d.code === 0) {
                        this.formData = d.data
                        this.showDialogVisible = true
                    }
                })
            },
            // 提交表单
            doUpdate() {
                this.$refs['updateForm']
                        .validate((valid) => {
                if (valid) {
                this.btnLoading = true
                this.$axios
                .$post(API_FETCHDATA_EXCELEMERGENCYSHELTER_UPDATE, this.formData)
                .then((d) => {
                this.btnLoading = false
                if (d.code === 0) {
                this.$message({
                message: d.msg,
                type: 'success'
                })
                this.updateDialogVisible = false
                this.listPage()
                }
                })
                }
                })
            },
            // 执行删除
            openDelete(row) {
                this.editData.id = row.id
                this.$confirm(
                        '确定删除该条数据 ？',
                        '操作提示',
                        {
                            confirmButtonText: '确 定',
                            cancelButtonText: '取 消',
                            type: 'warning'
                        }
                ).then(() => {
                    this.btnLoading = true
                    this.$axios
                            .$post(API_FETCHDATA_EXCELEMERGENCYSHELTER_DELETE, this.editData)
                            .then((res) => {
                                this.btnLoading = false
                                if (res.code === 0) {
                                    this.$message({
                                        message: res.msg,
                                        type: 'success'
                                    })
                                    this.listPage()
                                }
                            })
                }).catch(() => {})
            },
            // 页码变动事件
            doChangePage(val) {
                this.pageData.pageNo = val
                this.listPage()
            },
            // 页大小变动事件
            doSizeChange(val) {
                this.pageData.pageSize = val
                this.listPage()
            },
            // 页排序事件
            doPageSort(column) {
                this.pageData.pageOrderName = column.prop
                this.pageData.pageOrderBy = column.order
                this.listPage()
            },
            // 获取分页查询数据
            listPage() {
                this.listLoading = true
                this.$axios.$post(API_FETCHDATA_EXCELEMERGENCYSHELTER_LIST, this.pageData).then((res) => {
                    this.listLoading = false
                    if (res.code === 0) {
                        this.listData = res.data.list
                        this.pageData.totalCount = res.data.totalCount
                    }
                })
            },
            // 条件查询展示第一页内容
            doSearch() {
                this.pageData.pageNo = 1
                this.listPage()
            },
            doReSearch() {
                this.pageData = {
                    pageNo: 1,
                    pageSize: 10,
                    totalCount: 0,
                    pageOrderName: 'createdAt',
                    pageOrderBy: 'descending'
                }
                this.$refs['searchForm'].resetFields()
            },
            changeSearch() {
                this.showSearch = !this.showSearch
            }
        }
    }

</script>
